<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <title>选课列表</title>
    <link href="${base}/resources/css/common.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="${base}/resources/js/jquery.js"></script>
    <script type="text/javascript" src="${base}/resources/js/jquery.validate.js"></script>
    <script type="text/javascript" src="${base}/resources/js/common.js"></script>
    <script type="text/javascript" src="${base}/resources/js/input.js"></script>
    <script type="text/javascript">
        $().ready(function () {
            $inputForm = $("#inputForm")
            // 表单验证
            $inputForm.validate({
                rules: {
                    name: {
                        required: true,
                        minlength: 4,
                        maxlength: 16,
                    },
                    simpleName: {
                        required: true
                    },
                    code:{
                        required:true
                    }
                }
            });
            var courseType = $("#courseType option:selected").value();
            ale
        });

    </script>
</head>
<body>
<div class="path">
    <a href="${base}/common/index.jhtml">首页</a> &raquo; 选课
</div>

<form id="inputForm" action="selectCourse.html" method="get" enctype="multipart/form-data">
    <div align="left">
        <tr>
            <th>
                <span class="requiredField">&nbsp;</span>课程类型:
            </th>
            <td>
                <select  id="courseType" name="courseType" style="width:188px;height:24px">
                    <option value="">--请选择--</option>
                    <option value="COMPULSORY">必修课</option>
                    <option value="SELECTIVE">选修课</option>
                </select>
            </td>
        </tr>
            <th>
                &nbsp;
            </th>
            <input type="submit" class="button" id="submitForm" value="查询"/>
        </tr>
    </div>
    </div>
        <br>
        <table id="listTable" class="list">
            <tr>
                <th class="check">
                    <input type="checkbox" id="selectAll"/>
                </th>
                <th>
                    <a href="javascript:;" class="sort" name="no">课程编号</a>
                </th>
                <th>
                    <a href="javascript:;" class="sort" name="name">课程名</a>
                </th>
                <th>
                    <a href="javascript:;" class="sort" name="credit">学分</a>
                </th>
                <th>
                    <a href="javascript:;" class="sort" name="type">课程类型</a>
                </th>
                <th>
                    <a href="javascript:;" class="sort" name="place">操作</a>
                </th>
            </tr>
[#list page as student]
    <tr>
        <td>
            <input type="checkbox" name="id" value="${student.id}"/>
        </td>
        <td>
    ${student.course_no}
    </td>
        <td>
        ${student.course_name}
        </td>
        <td>
        ${student.credit}
        </td>
        <td>
            [#if (student.course_type!0) == 1]必修课[/#if]
            [#if (student.course_type!0) == 2]选修课[/#if]
        </td>
        <td>
        <a href="viewCourse.html?id=${student.id}">[查看详情]</a>
        </td>
    </tr>
[/#list]
    </table>
</form>
</body>
</html>